set( HEADER_PATH ${CMAKE_SOURCE_DIR}/include/osgEphemeris )

set( osgEphemerisPlugin_LIBS osgEphemeris )

#find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil osgText)
include( FindOSGHelper )




include_directories(
        ${CMAKE_SOURCE_DIR}/include
        ${OSG_INCLUDE_DIRS}
    )

SET(TARGET_SRC
    IO_EphemerisModel.cpp
	)


SET(TARGET_NAME osgdb_osgephemerismodel)
ADD_LIBRARY(${TARGET_NAME} SHARED ${TARGET_SRC} )
SET_TARGET_PROPERTIES( ${TARGET_NAME} PROPERTIES PREFIX "" )
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${osgEphemerisPlugin_LIBS} ${OPENSCENEGRAPH_LIBRARIES} )


SET(INSTALL_INCDIR include)
SET(INSTALL_BINDIR bin/osgPlugins-${OPENSCENEGRAPH_VERSION})
IF(WIN32)
    SET(INSTALL_LIBDIR bin)
    SET(INSTALL_ARCHIVEDIR lib)
ELSE()
    SET(INSTALL_LIBDIR lib${LIB_POSTFIX})
    SET(INSTALL_ARCHIVEDIR lib${LIB_POSTFIX})
ENDIF()


INSTALL(
    TARGETS ${TARGET_NAME}
    RUNTIME DESTINATION ${INSTALL_BINDIR}
    LIBRARY DESTINATION ${INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR}
)
